home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-16 | 1.4 KB | 61 lines | [TEXT/CWIE] |
- // =================================================================================
- //
- // CClockControl.h ©1996 Microsoft Corporation All rights reserved.
- //
- // =================================================================================
-
- #ifndef _H_CShapesControl
- #define _H_CShapesControl
- #pragma once
-
- #include "CBaseControl.h"
-
- typedef enum
- {
- BeginShapeType = 0,
- OvalShapeType,
- TriangleShapeType,
- RectangleShapeType,
- PentagonShapeType,
- HexagonShapeType,
- EndShapeType
- }
- ShapeType;
-
- class CShapesControl : public CBaseControl
- {
-
- public:
- // *** CShapesControl methods ***
- CShapesControl(void);
- ~CShapesControl(void);
-
- // *** IControl methods ***
- STDMETHOD (Draw) (THIS_ DrawContext* inContext);
- STDMETHOD (GetUsedArea)(THIS_ PlatformRegion* outUsedArea);
- STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
- STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon);
-
- // *** IPersistPropertyBag methods ***
- STDMETHOD (Load)(IPropertyBag* PropBag, IErrorLog* ErrorLog);
- STDMETHOD (LoadTextState)(IPropertyBag *PropertyBag, IErrorLog *ErrorLog);
-
- protected:
- virtual Boolean8 StartIdling(void);
- virtual Boolean8 StopIdling(void);
-
- private:
- void DrawAllContexts();
-
- // *** private methods ***
- void DrawMe(Rect *BoundsRect);
-
- // *** private members ***
- Point mSize;
- ShapeType mCurrentShape;
- Boolean8 mIsIdling;
- Boolean8 mIsPressed;
- };
-
- #endif
-